<!DOCTYPE html>
<html>
<head>
  <meta charset='UTF-8'/>
  <link rel="stylesheet" href="../../dist/mapbox.css"/>
  <link rel="stylesheet" href="embed.css"/>
  <script src="../../dist/mapbox.js"></script>
  <script src="access_token.js"></script>
</head>
<body>
<div id='map'></div>
<script type='text/javascript'>
    var map = L.mapbox.map('map', 'mapbox.light').setView([39.12367, -76.81229], 9);

    // The GeoJSON representing the two point features
    var geoJson = {
        type: 'FeatureCollection',
        features: [{
            type: 'Feature',
            properties: {
                title: 'Washington, D.C.',
                'marker-color': '#f00',
                'marker-size': 'large',
                url: 'http://en.wikipedia.org/wiki/Washington,_D.C.'
            },
            geometry: {
                type: 'Point',
                coordinates: [-77.03201, 38.90065]
            }
        },
        {
            type: 'Feature',
            properties: {
                title: 'Baltimore, MD',
                'marker-color': '#f00',
                'marker-size': 'large',
                url: 'http://en.wikipedia.org/wiki/Baltimore'
            },
            geometry: {
                type: 'Point',
                coordinates: [-76.60767, 39.28755]
            }
        }]
    };

    // Pass features and a custom factory function to the map
    map.featureLayer.setGeoJSON(geoJson);
    map.featureLayer.on('click', function(e) {
        e.layer.unbindPopup();
        window.open(e.layer.feature.properties.url);
    });

</script>
</body>
</html>
